<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductTypeList.ascx.cs" Inherits="admin_webparts_Plug_ins_Product_ProductTypeList" %>
<%@ Register Src="ProductTreeView.ascx" TagName="ProductTreeView" TagPrefix="uc1" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<style type="text/css">
#divTreeView {
    float: left;
    margin-top: 53px;
    border: solid 1px #89D;
}
</style>
<uc1:ProductTreeView ID="ProductTreeView1" runat="server" />
<script type="text/javascript">
YAHOO.util.Event.onDOMReady(function() {
    oTreePage.nodeClickEvent = function(data) {
        var oDom = YAHOO.util.Dom;

        var oFrame = oDom.get('frameData');
        oFrame.src = 'ProductContent.aspx?action=view&g=' + data.groupID + '&typeid=' + data.id + '&time=' + (new Date()).getTime();
    }
});

function onFrameUnload() {
    var frm = oDom.get('frameData');
    frm.height = 1;
}

function onFrameChanged() {
    var oDom = YAHOO.util.Dom;
    
    var frm = oDom.get('frameData');
    
    if (frm) {
        //frm.height = '1px';
        
        if(typeof window.onresize == 'function') {
            window.onresize();
        }
        
        if (frm.contentDocument && frm.contentDocument.body.offsetHeight) {
            // W3C DOM (and Mozilla) syntax
            frm.height = '' + (parseInt(frm.contentDocument.body.offsetHeight, 10)) + 'px';
        } else if (frm.Document && frm.Document.body.scrollHeight) {
            // IE DOM syntax
            frm.height = '' + (parseInt(frm.Document.body.scrollHeight, 10) - 5) + 'px';
        }
    }
}
YAHOO.util.Event.onDOMReady(onFrameChanged);
</script>
<div  style="margin-left: 0px;">
    <div class="tip">
	    <h1 style="left: -243px; position: relative;"><%=LanguageUtility.GetLanguageText("PRODUCT_MANAGEMENT", Session)%></h1>
        <div style="display: block; width: 32px; height: 32px; float: right; position: relative; top: -27px;"><a title="<%=LanguageUtility.GetLanguageText("CLICK_RETURN", Session) %>" href="<%=this._ReturnURL %>"><img src="resources/images/Back.png" alt="" /></a></div>
    </div>
</div>
<div  style="border: solid 1px #89D; margin-left: 260px; ">
    <div id="commonPageContainer" style="padding: 0px 5px;">
        <iframe id="frameData" onunload="onFrameUnload();" onload="javascript: onFrameChanged();" style="width: 100%; position: relative; top: -5px; margin: 0px; padding: 0px;" frameborder="0" marginheight="0px" enableviewstate="true" height="400px" scrolling="no" src=""></iframe>
    </div>
    <div style=" clear: both;"></div>
</div>